home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / TextServices.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  16.6 KB  |  690 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        TextServices.a
  3. ;
  4. ;    Contains:    Text Services Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__TEXTSERVICES__') = 'UNDEFINED' THEN
  21. __TEXTSERVICES__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  30.     include 'Events.a'
  31.     ENDIF
  32. ;        include 'Quickdraw.a'                                        ;
  33. ;            include 'MixedMode.a'                                    ;
  34. ;            include 'QuickdrawText.a'                                ;
  35. ;        include 'OSUtils.a'                                        ;
  36. ;            include 'Memory.a'                                        ;
  37.  
  38.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  39.     include 'Menus.a'
  40.     ENDIF
  41.  
  42.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  43.     include 'AppleEvents.a'
  44.     ENDIF
  45. ;        include 'Errors.a'                                            ;
  46. ;        include 'EPPC.a'                                            ;
  47. ;            include 'AppleTalk.a'                                    ;
  48. ;            include 'Files.a'                                        ;
  49. ;            include 'PPCToolbox.a'                                    ;
  50. ;            include 'Processes.a'                                    ;
  51. ;        include 'Notification.a'                                    ;
  52.  
  53.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  54.     include 'Errors.a'
  55.     ENDIF
  56.  
  57.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  58.     include 'Components.a'
  59.     ENDIF
  60.  
  61. kTSMVersion                        EQU        $200                ; Version of the Text Services Manager is 2.0  
  62. kTextService                    EQU        'tsvc'                ; component type for the component description 
  63. kInputMethodService                EQU        'inpm'                ; component subtype for the component description 
  64. ; Component Flags in ComponentDescription 
  65. bTakeActiveEvent                EQU        15                    ; bit set if the component takes active event 
  66. bHandleAERecording                EQU        16                    ; bit set if the component takes care of recording Apple Events <new in vers2.0> 
  67. bScriptMask                        EQU        $00007F00            ; bit 8 - 14 
  68. bLanguageMask                    EQU        $000000FF            ; bit 0 - 7  
  69. bScriptLanguageMask                EQU        bScriptMask + bLanguageMask ; bit 0 - 14  
  70.  
  71. ; Hilite styles 
  72. kCaretPosition                    EQU        1                    ; specify caret position 
  73. kRawText                        EQU        2                    ; specify range of raw text 
  74. kSelectedRawText                EQU        3                    ; specify range of selected raw text 
  75. kConvertedText                    EQU        4                    ; specify range of converted text 
  76. kSelectedConvertedText            EQU        5                    ; specify range of selected converted text 
  77.  
  78. ; Apple Event constants 
  79. ; Event class 
  80. kTextServiceClass                EQU        kTextService
  81. ; event ID 
  82. kUpdateActiveInputArea            EQU        'updt'                ; update the active Inline area 
  83. kPos2Offset                        EQU        'p2st'                ; converting global coordinates to char position 
  84. kOffset2Pos                        EQU        'st2p'                ; converting char position to global coordinates 
  85. kShowHideInputWindow            EQU        'shiw'                ; show or hide the input window 
  86. ; Event keywords 
  87. keyAETSMDocumentRefcon            EQU        'refc'                ; TSM document refcon, typeLongInteger 
  88. ; Note: keyAETSMScriptTag, keyAERequestedType, keyAETSMTextFont, keyAETextPointSize
  89. ;    typeAEText, typeIntlWritingCode, typeQDPoint, and keyAEAngle have been moved to 
  90. ;    AERegistry.h 
  91. keyAEServerInstance                EQU        'srvi'                ; component instance 
  92. keyAETheData                    EQU        'kdat'                ; typeText 
  93. keyAEFixLength                    EQU        'fixl'                ; fix len ?? 
  94. keyAEHiliteRange                EQU        'hrng'                ; hilite range array 
  95. keyAEUpdateRange                EQU        'udng'                ; update range array 
  96. keyAEClauseOffsets                EQU        'clau'                ; Clause Offsets array 
  97. keyAECurrentPoint                EQU        'cpos'                ; current point 
  98. keyAEDragging                    EQU        'bool'                ; dragging falg 
  99. keyAEOffset                        EQU        'ofst'                ; offset 
  100. keyAERegionClass                EQU        'rgnc'                ; region class 
  101. keyAEPoint                        EQU        'gpos'                ; current point 
  102. keyAEBufferSize                    EQU        'buff'                ; buffer size to get the text 
  103. keyAEMoveView                    EQU        'mvvw'                ; move view flag 
  104. keyAELength                        EQU        'leng'                ; length 
  105. keyAENextBody                    EQU        'nxbd'                ; next or previous body 
  106. ; optional keywords for Offset2Pos (Info about the active input area) 
  107. keyAETextLineHeight                EQU        'ktlh'                ; typeShortInteger 
  108. keyAETextLineAscent                EQU        'ktas'                ; typeShortInteger 
  109. ; optional keywords for Pos2Offset 
  110. keyAELeftSide                    EQU        'klef'                ; type Boolean 
  111. ; optional keywords for kShowHideInputWindow 
  112. keyAEShowHideInputWindow        EQU        'shiw'                ; type Boolean 
  113. ; for PinRange  
  114. keyAEPinRange                    EQU        'pnrg'
  115. ; Desc type ... 
  116. typeComponentInstance            EQU        'cmpi'                ; server instance 
  117. typeTextRangeArray                EQU        'tray'                ; text range array 
  118. typeOffsetArray                    EQU        'ofay'                ; offset array 
  119. typeText                        EQU        typeChar            ; Plain text 
  120. typeTextRange                    EQU        'txrn'
  121.  
  122. ; Desc type constants 
  123. kTSMOutsideOfBody                EQU        1
  124. kTSMInsideOfBody                EQU        2
  125. kTSMInsideOfActiveInputArea        EQU        3
  126.  
  127. kNextBody                        EQU        1
  128. kPreviousBody                    EQU        2
  129.  
  130. ; typeTextRange         'txrn' 
  131. TextRange                 RECORD    0
  132. fStart                     ds.l   1        ; offset: $0 (0)
  133. fEnd                     ds.l   1        ; offset: $4 (4)
  134. fHiliteStyle             ds.w   1        ; offset: $8 (8)
  135. sizeof                     EQU *            ; size:   $A (10)
  136.                         ENDR
  137.  
  138. ; typedef struct TextRange     TextRange
  139. ; typedef TextRange         *TextRangePtr
  140. ; typedef TextRangePtr         *TextRangeHandle
  141. ; typeTextRangeArray    'txra' 
  142. TextRangeArray             RECORD    0
  143. fNumOfRanges             ds.w   1        ; offset: $0 (0)        ; specify the size of the fRange array 
  144. fRange                     ds     TextRange ; offset: $2 (2)        ; when fNumOfRanges > 1, the size of this array has to be calculated 
  145. sizeof                     EQU *            ; size:   $C (12)
  146.                         ENDR
  147.  
  148. ; typedef struct TextRangeArray  TextRangeArray
  149. ; typedef TextRangeArray     *TextRangeArrayPtr
  150. ; typedef TextRangeArrayPtr  *TextRangeArrayHandle
  151. ; typeOffsetArray        'offa' 
  152. OffsetArray             RECORD    0
  153. fNumOfOffsets             ds.w   1        ; offset: $0 (0)        ; specify the size of the fOffset array 
  154. fOffset                     ds.l   1        ; offset: $2 (2)        ; when fNumOfOffsets > 1, the size of this array has to be calculated 
  155. sizeof                     EQU *            ; size:   $6 (6)
  156.                         ENDR
  157.  
  158. ; typedef struct OffsetArray  OffsetArray
  159. ; typedef OffsetArray         *OffsetArrayPtr
  160. ; typedef OffsetArrayPtr     *OffsetArrayHandle
  161. ; typedef void                 *TSMDocumentID
  162. ; typedef OSType             InterfaceTypeList[1]
  163. ; Text Service Info List 
  164. TextServiceInfo         RECORD    0
  165. fComponent                 ds.l   1        ; offset: $0 (0)
  166. fItemName                 ds.l   64        ; offset: $4 (4)
  167. sizeof                     EQU *            ; size:   $104 (260)
  168.                         ENDR
  169.  
  170. ; typedef struct TextServiceInfo  TextServiceInfo
  171. ; typedef TextServiceInfo     *TextServiceInfoPtr
  172. TextServiceList         RECORD    0
  173. fTextServiceCount         ds.w   1        ; offset: $0 (0)        ; number of entries in the 'fServices' array 
  174. fServices                 ds     TextServiceInfo ; offset: $2 (2) ; Note: array of 'TextServiceInfo' records follows 
  175. sizeof                     EQU *            ; size:   $106 (262)
  176.                         ENDR
  177.  
  178. ; typedef struct TextServiceList  TextServiceList
  179. ; typedef TextServiceList     *TextServiceListPtr
  180. ; typedef TextServiceListPtr  *TextServiceListHandle
  181. ScriptLanguageRecord     RECORD    0
  182. fScript                     ds.w   1        ; offset: $0 (0)
  183. fLanguage                 ds.w   1        ; offset: $2 (2)
  184. sizeof                     EQU *            ; size:   $4 (4)
  185.                         ENDR
  186.  
  187. ; typedef struct ScriptLanguageRecord  ScriptLanguageRecord
  188. ScriptLanguageSupport     RECORD    0
  189. fScriptLanguageCount     ds.w   1        ; offset: $0 (0)        ; number of entries in the 'fScriptLanguageArray' array 
  190. fScriptLanguageArray     ds     ScriptLanguageRecord ; offset: $2 (2) ; Note: array of 'ScriptLanguageRecord' records follows 
  191. sizeof                     EQU *            ; size:   $6 (6)
  192.                         ENDR
  193.  
  194. ; typedef struct ScriptLanguageSupport  ScriptLanguageSupport
  195. ; typedef ScriptLanguageSupport  *ScriptLanguageSupportPtr
  196. ; typedef ScriptLanguageSupportPtr  *ScriptLanguageSupportHandle
  197.  
  198. ; Low level routines which are dispatched directly to the Component Manager 
  199. kCMGetScriptLangSupport            EQU        $0001                ; Component Manager call selector 1 
  200. kCMInitiateTextService            EQU        $0002                ; Component Manager call selector 2 
  201. kCMTerminateTextService            EQU        $0003                ; Component Manager call selector 3 
  202. kCMActivateTextService            EQU        $0004                ; Component Manager call selector 4 
  203. kCMDeactivateTextService        EQU        $0005                ; Component Manager call selector 5 
  204. kCMTextServiceEvent                EQU        $0006                ; Component Manager call selector 6 
  205. kCMGetTextServiceMenu            EQU        $0007                ; Component Manager call selector 7 
  206. kCMTextServiceMenuSelect        EQU        $0008                ; Component Manager call selector 8 
  207. kCMFixTextService                EQU        $0009                ; Component Manager call selector 9 
  208. kCMSetTextServiceCursor            EQU        $000A                ; Component Manager call selector 10 
  209. kCMHidePaletteWindows            EQU        $000B                ; Component Manager call selector 11 
  210.  
  211. ; High level TSM routines 
  212. ;
  213. ; pascal OSErr NewTSMDocument(short numOfInterface, InterfaceTypeList supportedInterfaceTypes, TSMDocumentID *idocID, long refcon)
  214. ;
  215.     IF ¬ GENERATINGCFM THEN
  216.         Macro
  217.         _NewTSMDocument
  218.             moveq    #0,d0
  219.             dc.w     $AA54
  220.         EndM
  221.     ELSE
  222.         IMPORT_CFM_FUNCTION    NewTSMDocument
  223.     ENDIF
  224.  
  225. ;
  226. ; pascal OSErr DeleteTSMDocument(TSMDocumentID idocID)
  227. ;
  228.     IF ¬ GENERATINGCFM THEN
  229.         Macro
  230.         _DeleteTSMDocument
  231.             moveq    #1,d0
  232.             dc.w     $AA54
  233.         EndM
  234.     ELSE
  235.         IMPORT_CFM_FUNCTION    DeleteTSMDocument
  236.     ENDIF
  237.  
  238. ;
  239. ; pascal OSErr ActivateTSMDocument(TSMDocumentID idocID)
  240. ;
  241.     IF ¬ GENERATINGCFM THEN
  242.         Macro
  243.         _ActivateTSMDocument
  244.             moveq    #2,d0
  245.             dc.w     $AA54
  246.         EndM
  247.     ELSE
  248.         IMPORT_CFM_FUNCTION    ActivateTSMDocument
  249.     ENDIF
  250.  
  251. ;
  252. ; pascal OSErr DeactivateTSMDocument(TSMDocumentID idocID)
  253. ;
  254.     IF ¬ GENERATINGCFM THEN
  255.         Macro
  256.         _DeactivateTSMDocument
  257.             moveq    #3,d0
  258.             dc.w     $AA54
  259.         EndM
  260.     ELSE
  261.         IMPORT_CFM_FUNCTION    DeactivateTSMDocument
  262.     ENDIF
  263.  
  264. ;
  265. ; pascal Boolean TSMEvent(EventRecord *event)
  266. ;
  267.     IF ¬ GENERATINGCFM THEN
  268.         Macro
  269.         _TSMEvent
  270.             moveq    #4,d0
  271.             dc.w     $AA54
  272.         EndM
  273.     ELSE
  274.         IMPORT_CFM_FUNCTION    TSMEvent
  275.     ENDIF
  276.  
  277. ;
  278. ; pascal Boolean TSMMenuSelect(long menuResult)
  279. ;
  280.     IF ¬ GENERATINGCFM THEN
  281.         Macro
  282.         _TSMMenuSelect
  283.             moveq    #5,d0
  284.             dc.w     $AA54
  285.         EndM
  286.     ELSE
  287.         IMPORT_CFM_FUNCTION    TSMMenuSelect
  288.     ENDIF
  289.  
  290. ;
  291. ; pascal Boolean SetTSMCursor(Point mousePos)
  292. ;
  293.     IF ¬ GENERATINGCFM THEN
  294.         Macro
  295.         _SetTSMCursor
  296.             moveq    #6,d0
  297.             dc.w     $AA54
  298.         EndM
  299.     ELSE
  300.         IMPORT_CFM_FUNCTION    SetTSMCursor
  301.     ENDIF
  302.  
  303. ;
  304. ; pascal OSErr FixTSMDocument(TSMDocumentID idocID)
  305. ;
  306.     IF ¬ GENERATINGCFM THEN
  307.         Macro
  308.         _FixTSMDocument
  309.             moveq    #7,d0
  310.             dc.w     $AA54
  311.         EndM
  312.     ELSE
  313.         IMPORT_CFM_FUNCTION    FixTSMDocument
  314.     ENDIF
  315.  
  316. ;
  317. ; pascal OSErr GetServiceList(short numOfInterface, OSType *supportedInterfaceTypes, TextServiceListHandle *serviceInfo, long *seedValue)
  318. ;
  319.     IF ¬ GENERATINGCFM THEN
  320.         Macro
  321.         _GetServiceList
  322.             moveq    #8,d0
  323.             dc.w     $AA54
  324.         EndM
  325.     ELSE
  326.         IMPORT_CFM_FUNCTION    GetServiceList
  327.     ENDIF
  328.  
  329. ;
  330. ; pascal OSErr OpenTextService(TSMDocumentID idocID, Component aComponent, ComponentInstance *aComponentInstance)
  331. ;
  332.     IF ¬ GENERATINGCFM THEN
  333.         Macro
  334.         _OpenTextService
  335.             moveq    #9,d0
  336.             dc.w     $AA54
  337.         EndM
  338.     ELSE
  339.         IMPORT_CFM_FUNCTION    OpenTextService
  340.     ENDIF
  341.  
  342. ;
  343. ; pascal OSErr CloseTextService(TSMDocumentID idocID, ComponentInstance aComponentInstance)
  344. ;
  345.     IF ¬ GENERATINGCFM THEN
  346.         Macro
  347.         _CloseTextService
  348.             moveq    #10,d0
  349.             dc.w     $AA54
  350.         EndM
  351.     ELSE
  352.         IMPORT_CFM_FUNCTION    CloseTextService
  353.     ENDIF
  354.  
  355. ;
  356. ; pascal OSErr SendAEFromTSMComponent(const AppleEvent *theAppleEvent, AppleEvent *reply, AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks, AEIdleUPP idleProc, AEFilterUPP filterProc)
  357. ;
  358.     IF ¬ GENERATINGCFM THEN
  359.         Macro
  360.         _SendAEFromTSMComponent
  361.             moveq    #11,d0
  362.             dc.w     $AA54
  363.         EndM
  364.     ELSE
  365.         IMPORT_CFM_FUNCTION    SendAEFromTSMComponent
  366.     ENDIF
  367.  
  368. ;
  369. ; pascal OSErr InitTSMAwareApplication(void)
  370. ;
  371.     IF ¬ GENERATINGCFM THEN
  372.         Macro
  373.         _InitTSMAwareApplication
  374.             moveq    #20,d0
  375.             dc.w     $AA54
  376.         EndM
  377.     ELSE
  378.         IMPORT_CFM_FUNCTION    InitTSMAwareApplication
  379.     ENDIF
  380.  
  381. ;
  382. ; pascal OSErr CloseTSMAwareApplication(void)
  383. ;
  384.     IF ¬ GENERATINGCFM THEN
  385.         Macro
  386.         _CloseTSMAwareApplication
  387.             moveq    #21,d0
  388.             dc.w     $AA54
  389.         EndM
  390.     ELSE
  391.         IMPORT_CFM_FUNCTION    CloseTSMAwareApplication
  392.     ENDIF
  393.  
  394. ; Utilities 
  395. ;
  396. ; pascal OSErr SetDefaultInputMethod(Component ts, ScriptLanguageRecord *slRecordPtr)
  397. ;
  398.     IF ¬ GENERATINGCFM THEN
  399.         Macro
  400.         _SetDefaultInputMethod
  401.             moveq    #12,d0
  402.             dc.w     $AA54
  403.         EndM
  404.     ELSE
  405.         IMPORT_CFM_FUNCTION    SetDefaultInputMethod
  406.     ENDIF
  407.  
  408. ;
  409. ; pascal OSErr GetDefaultInputMethod(Component *ts, ScriptLanguageRecord *slRecordPtr)
  410. ;
  411.     IF ¬ GENERATINGCFM THEN
  412.         Macro
  413.         _GetDefaultInputMethod
  414.             moveq    #13,d0
  415.             dc.w     $AA54
  416.         EndM
  417.     ELSE
  418.         IMPORT_CFM_FUNCTION    GetDefaultInputMethod
  419.     ENDIF
  420.  
  421. ;
  422. ; pascal OSErr SetTextServiceLanguage(ScriptLanguageRecord *slRecordPtr)
  423. ;
  424.     IF ¬ GENERATINGCFM THEN
  425.         Macro
  426.         _SetTextServiceLanguage
  427.             moveq    #14,d0
  428.             dc.w     $AA54
  429.         EndM
  430.     ELSE
  431.         IMPORT_CFM_FUNCTION    SetTextServiceLanguage
  432.     ENDIF
  433.  
  434. ;
  435. ; pascal OSErr GetTextServiceLanguage(ScriptLanguageRecord *slRecordPtr)
  436. ;
  437.     IF ¬ GENERATINGCFM THEN
  438.         Macro
  439.         _GetTextServiceLanguage
  440.             moveq    #15,d0
  441.             dc.w     $AA54
  442.         EndM
  443.     ELSE
  444.         IMPORT_CFM_FUNCTION    GetTextServiceLanguage
  445.     ENDIF
  446.  
  447. ;
  448. ; pascal OSErr UseInputWindow(TSMDocumentID idocID, Boolean useWindow)
  449. ;
  450.     IF ¬ GENERATINGCFM THEN
  451.         Macro
  452.         _UseInputWindow
  453.             moveq    #16,d0
  454.             dc.w     $AA54
  455.         EndM
  456.     ELSE
  457.         IMPORT_CFM_FUNCTION    UseInputWindow
  458.     ENDIF
  459.  
  460. ;
  461. ; pascal OSErr NewServiceWindow(void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, ComponentInstance ts, WindowPtr *window)
  462. ;
  463.     IF ¬ GENERATINGCFM THEN
  464.         Macro
  465.         _NewServiceWindow
  466.             moveq    #17,d0
  467.             dc.w     $AA54
  468.         EndM
  469.     ELSE
  470.         IMPORT_CFM_FUNCTION    NewServiceWindow
  471.     ENDIF
  472.  
  473. ;
  474. ; pascal OSErr CloseServiceWindow(WindowPtr window)
  475. ;
  476.     IF ¬ GENERATINGCFM THEN
  477.         Macro
  478.         _CloseServiceWindow
  479.             moveq    #18,d0
  480.             dc.w     $AA54
  481.         EndM
  482.     ELSE
  483.         IMPORT_CFM_FUNCTION    CloseServiceWindow
  484.     ENDIF
  485.  
  486. ;
  487. ; pascal OSErr GetFrontServiceWindow(WindowPtr *window)
  488. ;
  489.     IF ¬ GENERATINGCFM THEN
  490.         Macro
  491.         _GetFrontServiceWindow
  492.             moveq    #19,d0
  493.             dc.w     $AA54
  494.         EndM
  495.     ELSE
  496.         IMPORT_CFM_FUNCTION    GetFrontServiceWindow
  497.     ENDIF
  498.  
  499. ;
  500. ; pascal short FindServiceWindow(Point thePoint, WindowPtr *theWindow)
  501. ;
  502.     IF ¬ GENERATINGCFM THEN
  503.         Macro
  504.         _FindServiceWindow
  505.             moveq    #23,d0
  506.             dc.w     $AA54
  507.         EndM
  508.     ELSE
  509.         IMPORT_CFM_FUNCTION    FindServiceWindow
  510.     ENDIF
  511.  
  512. ; Low level TSM routines 
  513. ;
  514. ; pascal ComponentResult GetScriptLanguageSupport(ComponentInstance ts, ScriptLanguageSupportHandle *scriptHdl)
  515. ;
  516.     IF ¬ GENERATINGCFM THEN
  517.         Macro
  518.         _GetScriptLanguageSupport
  519.             dc.w     $2F3C
  520.             dc.w     $0004
  521.             dc.w     $0001
  522.             moveq    #0,d0
  523.             dc.w     $A82A
  524.         EndM
  525.     ELSE
  526.         IMPORT_CFM_FUNCTION    GetScriptLanguageSupport
  527.     ENDIF
  528.  
  529. ;
  530. ; pascal ComponentResult InitiateTextService(ComponentInstance ts)
  531. ;
  532.     IF ¬ GENERATINGCFM THEN
  533.         Macro
  534.         _InitiateTextService
  535.             dc.w     $2F3C
  536.             dc.w     $0000
  537.             dc.w     $0002
  538.             moveq    #0,d0
  539.             dc.w     $A82A
  540.         EndM
  541.     ELSE
  542.         IMPORT_CFM_FUNCTION    InitiateTextService
  543.     ENDIF
  544.  
  545. ;
  546. ; pascal ComponentResult TerminateTextService(ComponentInstance ts)
  547. ;
  548.     IF ¬ GENERATINGCFM THEN
  549.         Macro
  550.         _TerminateTextService
  551.             dc.w     $2F3C
  552.             dc.w     $0000
  553.             dc.w     $0003
  554.             moveq    #0,d0
  555.             dc.w     $A82A
  556.         EndM
  557.     ELSE
  558.         IMPORT_CFM_FUNCTION    TerminateTextService
  559.     ENDIF
  560.  
  561. ;
  562. ; pascal ComponentResult ActivateTextService(ComponentInstance ts)
  563. ;
  564.     IF ¬ GENERATINGCFM THEN
  565.         Macro
  566.         _ActivateTextService
  567.             dc.w     $2F3C
  568.             dc.w     $0000
  569.             dc.w     $0004
  570.             moveq    #0,d0
  571.             dc.w     $A82A
  572.         EndM
  573.     ELSE
  574.         IMPORT_CFM_FUNCTION    ActivateTextService
  575.     ENDIF
  576.  
  577. ;
  578. ; pascal ComponentResult DeactivateTextService(ComponentInstance ts)
  579. ;
  580.     IF ¬ GENERATINGCFM THEN
  581.         Macro
  582.         _DeactivateTextService
  583.             dc.w     $2F3C
  584.             dc.w     $0000
  585.             dc.w     $0005
  586.             moveq    #0,d0
  587.             dc.w     $A82A
  588.         EndM
  589.     ELSE
  590.         IMPORT_CFM_FUNCTION    DeactivateTextService
  591.     ENDIF
  592.  
  593. ;
  594. ; pascal ComponentResult TextServiceEvent(ComponentInstance ts, short numOfEvents, EventRecord *event)
  595. ;
  596.     IF ¬ GENERATINGCFM THEN
  597.         Macro
  598.         _TextServiceEvent
  599.             dc.w     $2F3C
  600.             dc.w     $0006
  601.             dc.w     $0006
  602.             moveq    #0,d0
  603.             dc.w     $A82A
  604.         EndM
  605.     ELSE
  606.         IMPORT_CFM_FUNCTION    TextServiceEvent
  607.     ENDIF
  608.  
  609. ;
  610. ; pascal ComponentResult GetTextServiceMenu(ComponentInstance ts, MenuHandle *serviceMenu)
  611. ;
  612.     IF ¬ GENERATINGCFM THEN
  613.         Macro
  614.         _GetTextServiceMenu
  615.             dc.w     $2F3C
  616.             dc.w     $0004
  617.             dc.w     $0007
  618.             moveq    #0,d0
  619.             dc.w     $A82A
  620.         EndM
  621.     ELSE
  622.         IMPORT_CFM_FUNCTION    GetTextServiceMenu
  623.     ENDIF
  624.  
  625. ;
  626. ; pascal ComponentResult TextServiceMenuSelect(ComponentInstance ts, MenuHandle serviceMenu, short item)
  627. ;
  628.     IF ¬ GENERATINGCFM THEN
  629.         Macro
  630.         _TextServiceMenuSelect
  631.             dc.w     $2F3C
  632.             dc.w     $0006
  633.             dc.w     $0008
  634.             moveq    #0,d0
  635.             dc.w     $A82A
  636.         EndM
  637.     ELSE
  638.         IMPORT_CFM_FUNCTION    TextServiceMenuSelect
  639.     ENDIF
  640.  
  641. ;
  642. ; pascal ComponentResult FixTextService(ComponentInstance ts)
  643. ;
  644.     IF ¬ GENERATINGCFM THEN
  645.         Macro
  646.         _FixTextService
  647.             dc.w     $2F3C
  648.             dc.w     $0000
  649.             dc.w     $0009
  650.             moveq    #0,d0
  651.             dc.w     $A82A
  652.         EndM
  653.     ELSE
  654.         IMPORT_CFM_FUNCTION    FixTextService
  655.     ENDIF
  656.  
  657. ;
  658. ; pascal ComponentResult SetTextServiceCursor(ComponentInstance ts, Point mousePos)
  659. ;
  660.     IF ¬ GENERATINGCFM THEN
  661.         Macro
  662.         _SetTextServiceCursor
  663.             dc.w     $2F3C
  664.             dc.w     $0004
  665.             dc.w     $000A
  666.             moveq    #0,d0
  667.             dc.w     $A82A
  668.         EndM
  669.     ELSE
  670.         IMPORT_CFM_FUNCTION    SetTextServiceCursor
  671.     ENDIF
  672.  
  673. ;
  674. ; pascal ComponentResult HidePaletteWindows(ComponentInstance ts)
  675. ;
  676.     IF ¬ GENERATINGCFM THEN
  677.         Macro
  678.         _HidePaletteWindows
  679.             dc.w     $2F3C
  680.             dc.w     $0000
  681.             dc.w     $000B
  682.             moveq    #0,d0
  683.             dc.w     $A82A
  684.         EndM
  685.     ELSE
  686.         IMPORT_CFM_FUNCTION    HidePaletteWindows
  687.     ENDIF
  688.  
  689.     ENDIF ; __TEXTSERVICES__
  690.